<?php
$str = "mysql:dbname=love";

$pdo = new PDO($str,'root');

$sel =$pdo->prepare('select * from you where name=:name;');

$convertName=mb_convert_encoding('$name','GBK','UTF8');

$exect = $sel->execute(array('name'=>"convertName"));

$line = $sel->fetchAll(PDO::FETCH_NAMED);

var_dump($line);


// @$age = $_REQUEST['age'];

// $pdo = new PDO('mysql:dbname=love','root');

// $stat = $pdo->prepare('select * from you where age='.$age);

// $stat->execute();

// $data = $stat->fetchAll(PDO::FETCH_NAMED);

// var_dump($data);